<% content_for :title do %>Show User<% end %>
<h1>Show User</h1>

<div class="good">
	<%= notice %>
</div>

<p>
	<strong>ID:</strong>
	<%= @user.id.to_s %>
</p>


<p>
	<strong>Name:</strong>
	<%= @user.name %>
</p>


<p>
	<strong>Email:</strong>
	<%= @user.email %>
</p>

<p>
	<strong>Date Added:</strong>
	<%= @user.created_at %>
</p>

<% @user.comments.each do |comment| %>
<p>
	<strong>Comment:</strong>
	<%= comment.content %>
	<strong>Left By:</strong>
	<%= comment.author %>
	<%= link_to "Delete Comment", user_comment_path(@user.id, comment), method: :delete, data: { confirm: 'Are you sure?' } %>
	<%= puts comment %>
</p>
<% end %>

<%= link_to "Add Comment", new_user_comment_path(@user) %><br />
<%= link_to "Back", users_path %>
